﻿//-----------------------------------------------------------------------
// <copyright file="Settings.cs" company="Craig Longford (deltawolf7@gmail.com)">
//     Copyright (c) Craig Longford. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Delta.Mercury.Business.Web
{
    using System;
    
    /// <summary>
    /// Mercury system settings
    /// </summary>
    [Serializable]
    public static class Settings
    {
        #region Mercury System Setting Get Methods
        /// <summary>
        /// Get mail server address
        /// </summary>
        /// <returns>Mail server address</returns>
        internal static string GetMailServer()
        {
            return Mercury.Business.Settings.GetSetting("MERCURY.MAILSERVER");
        }

        /// <summary>
        /// Get mail server username
        /// </summary>
        /// <returns>Mail server username</returns>
        internal static string GetMailServerUsername()
        {
            return Mercury.Business.Settings.GetSetting("MERCURY.MAILSERVERUSERNAME");
        }

        /// <summary>
        /// Get mail sender send as
        /// </summary>
        /// <returns>Mail server send as</returns>
        internal static string GetMailServerSendAs()
        {
            return Mercury.Business.Settings.GetSetting("MERCURY.MAILSERVERSENDAS");
        }

        /// <summary>
        /// Get mail server password
        /// </summary>
        /// <returns>Mail server password</returns>
        internal static string GetMailServerPassword()
        {
            return Mercury.Business.Settings.GetSetting("MERCURY.MAILSERVERPASSWORD");
        }

        /// <summary>
        /// Get mail server port
        /// </summary>
        /// <returns>Mail server port</returns>
        internal static int GetMailServerPort()
        {
            return int.Parse(Mercury.Business.Settings.GetSetting("MERCURY.MAILSERVERPORT"));
        }
        #endregion
    }
}
